package org.janusproject.demos.acl.basic.agent;

import java.util.logging.Level;
import java.util.logging.Logger;

import org.janusproject.acl.ACLAgent;
import org.janusproject.acl.ACLMessage;
import org.janusproject.kernel.status.Status;
import org.janusproject.kernel.status.StatusFactory;

public class ACLReceiver extends ACLAgent {

	private static final long serialVersionUID = -7078376398776599011L;
	
	public Status live() {
		
		ACLMessage aMsg = getACLMessage();
		
		if( aMsg != null ){
			
			Logger logger = Logger.getAnonymousLogger();
			
			logger.log(Level.INFO, "\nMESSAGE RECU par " + getName() + " : " + aMsg.toString());
			
		}
		
		return StatusFactory.ok(this);
	}
	
}